home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Date: 5 Jan 1996 16:00:48 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4cjhvg$4im@maureen.teleport.com>
- References: <john.hendrikx.40ka@grafix.xs4all.nl> <4b77tq$htp@serpens.rhein.de> <MQAQx*XOe@yaps.rhein.de> <4bqhnf$6g5@sunsystem5.informatik.tu-muenchen.de> <jasonb.820051107@cs.uwa.edu.au> <4c9i2l$h3i@sunsystem5.informatik.tu-muenchen.de> <Kevin_Phair.040
- NNTP-Posting-Host: kelly.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Distribution:
-
- Kevin Phair (Kevin_Phair@bgi.internet-eireann.ie) wrote:
- : fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) writes:
-
- : > : But you can't say whether move.w (a0)+,(a1)+ is what you want without
- : > : knowing what a0 and a1 are pointing to any more than you can with C.
- : >
- : > yes, but in the C example you even don't know if it's .w, TAIC.
-
- : So when you declare your C variables, why don't you append _w, _c, _l
- : depending on what type they are? But surely since you can give your
- : variables meaningful name, you should be able to tell what type they
- : are anyway?
-
- Marking a variable with type extension is done in assembly too. ex:
-
- move.w (TASK_MyVariable_W, a4),([TASK_MyTable_PW,a4],d0.w*W_SIZEOF)
-
- (This is too compensate for the lack of type checking by the assembler)
-
- in C:
-
- TASK->MyTable[offset] = TASK->MyVariable;
-
- The (a0)+,(a1)+ example is 'bogus' because who knows what a0 and a1 point
- too? a0 could be a pointer to a string for all you know looking at
- that single instruction... You know what the inst is doing, but you
- dont know what the instruction is about.
-
- Stephan
-